﻿@model EAM.Model.AssetInventory
@{
    ViewBag.Title = "编辑资产盘点";
    var membersDict = (Dictionary<Guid, string>)ViewData["memberIDDict"];
}
<div style="padding: 10px;">
    <div style="padding-bottom: 5px;">
        <input type="button" onclick="history.go(-1)" value="返回盘点列表" class="btn_green" />
    </div>
    @using (Html.BeginForm())
    {
        <div style="line-height: 30px; font-weight: bold; color: Red;">
        </div>
        <table class="tb">
            <tr>
                <td class="editor-label">盘点名称</td>
                <td >
                    @Html.TextBoxFor(m => m.AssetInventoryName, new { @style = "width:98%;" })
                    @Html.ValidationMessageFor(m => m.AssetInventoryName)
                </td>

                 <td class="editor-label">盘点状态</td>
                <td>
                    @Html.DropDownListFor(m => m.AssetInventoryState, new SelectList((Dictionary<int, string>)ViewData["inventoryStatus"], "key", "value"), "请选择类型")
                    @Html.ValidationMessageFor(m => m.AssetInventoryState)
                </td>

            </tr>
            <tr>
                <td class="editor-label">盘点开始时间</td>
                <td>
                     @Html.TextBoxFor(m => m.AssetInventoryStartDateTime)
                </td>
               <td class="editor-label">盘点结束时间</td>
                <td>
                     @Html.TextBoxFor(m => m.AssetInventoryEndDateTime)
                </td>
            </tr>
            <tr>
                <td class="editor-label">盘点描述</td>
                <td>
                    @Html.TextAreaFor(m => m.AssetInventoryDescript, 6, 40, null)
                </td>
                <td class="editor-label">盘点汇总</td>
                <td>
                    @Html.TextAreaFor(m => m.AssetInventorySum, 6, 40, null)
                </td>
            </tr>
            <tr>
                <td class="editor-label">盘点人</td>
                <td >
                    @Html.DropDownListFor(m => m.AssetInventoryMember, new SelectList(membersDict, "key", "value"), "请选择类型")
                </td>
                <td class="editor-label">盘点审核人</td>
                <td >
                    @membersDict[(Model.AssetInventoryCheckMember??new Guid())]
                    @Html.HiddenFor(m => m.AssetInventoryCheckMember)
                </td>
            </tr>
            
            <tr>
                <td></td>
                <td colspan="3">
                    <input type="submit" value="保存" class="btn_green" />
                    <input type="reset" value="重置" class="btn_orange" />
                </td>
            </tr>
        </table>
    }
</div>
<script type="text/javascript">
    $(function () {
        $("#AssetInventoryStartDateTime").ligerDateEditor({ initValue: $("#AssetInventoryStartDateTime").val() });
        $("#AssetInventoryEndDateTime").ligerDateEditor({ initValue: $("#AssetInventoryEndDateTime").val() });        
    });
</script>